package com.gxa.community.admin.util;


import org.apache.shiro.crypto.hash.SimpleHash;
import org.apache.shiro.util.ByteSource;

public class Md5Utils {
    public static String getCiphertext(String loginPwd, ByteSource source){//获取密文，传入参数为明文及盐值
        String hashAlgorithmName = "MD5";//加密方式
        Integer count = 1024;//加密次数
        SimpleHash ciphertext = new SimpleHash(hashAlgorithmName, loginPwd, source, count);
        return ciphertext.toString();
    }
}
